package com.lihao.sam.controller;

import com.lihao.sam.entity.xiaobei.ArticleExWarehouseRegistration;
import com.lihao.sam.entity.xiaobei.WarehousingRegistrationOfArticles;
import com.lihao.sam.service.intf.ArticleExWarehouseRegistrationService;
import com.lihao.sam.service.intf.WarehousingRegistrationOfArticlesService;
import com.lihao.sam.vo.PageVo;
import com.lihao.sam.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

/**
 * @Author yifu
 * @Description UserController
 * @Date 13:10 2022/11/22
 */
@RestController
@RequestMapping("/api/articleExWarehouseRegistration/")
public class ArticleExWarehouseRegistrationController {
    @Resource
    private ArticleExWarehouseRegistrationService service;

    @PostMapping("add.do")
    public R add(ArticleExWarehouseRegistration articleExWarehouseRegistration){
        return service.add(articleExWarehouseRegistration);
    }
    @PostMapping("update.do")
    public R update(ArticleExWarehouseRegistration articleExWarehouseRegistration){
        return service.update(articleExWarehouseRegistration);
    }
    @PostMapping("delete.do")
    public R delete(int id, HttpSession session){
        return service.delete(id);
    }
    @PostMapping("deletebatch.do")
    public R deleteBatch(int[] ids) {
        return service.delBatch(ids);
    }
    @GetMapping("page.do")
    public PageVo page(String goodsid, String goodsname, String specification, int page, int limit){
        return service.queryPage(goodsid,goodsname, specification, page, limit);
    }


}
